/*
 */

package com.railway.news.service;

import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.*;
import org.apache.commons.lang.StringUtils;

import com.railway.common.base.*;
import com.railway.common.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.railway.news.model.*;
import com.railway.news.dao.*;
import com.railway.news.service.*;
import com.railway.news.vo.query.*;

/**
 * @author  jiangcheng
 * @version 1.0
 * @since 1.0
 */

public interface ICategoryManager{
	
	public List getUsernamesByMap(Map map);
	
    public void saveCategoryUserLink(List list);
	
	public Page findPage(CategoryQuery query);

	public Category getById(java.lang.String id);
	
	public List<Category> findAll();
	
	/** 根据id检查是否插入或是更新数据 */
	public void saveOrUpdate(Category entity);
	
	/** 插入数据 */
	public void save(Category entity);
	
	public void removeById(java.lang.String id);
	
	public void update(Category entity);
	
	public boolean isUnique(Category entity, String uniquePropertyNames);

	
	public List getPermitCategoriesByUser(CategoryUserLink culinkquery);	
	/**
	 * 通过类型获得相应的分类（可能是新闻的专题,也可能是软件的分类,根据type而定
	 * @return
	 */
	public List<Category> findByType(String type);
	
	public void removeLinkByUserId(String userId);
	
	public void deleteCategoryUserLinkById(String id);
	
	public void saveCategoryUserLink(CategoryUserLink entity);

}
